package com.sugar.psych.assessment.module.business.dal.mysql.basicconfig;

import java.util.*;

import com.sugar.psych.assessment.framework.common.pojo.PageResult;
import com.sugar.psych.assessment.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.sugar.psych.assessment.framework.mybatis.core.mapper.BaseMapperX;
import com.sugar.psych.assessment.module.business.dal.dataobject.basicconfig.BasicConfigDO;
import org.apache.ibatis.annotations.Mapper;
import com.sugar.psych.assessment.module.business.controller.admin.basicconfig.vo.*;

/**
 * 基本配置 Mapper
 *
 * @author Ysugar
 */
@Mapper
public interface BasicConfigMapper extends BaseMapperX<BasicConfigDO> {

    default PageResult<BasicConfigDO> selectPage(BasicConfigPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<BasicConfigDO>()
                .betweenIfPresent(BasicConfigDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(BasicConfigDO::getId));
    }

}